Ext.define('BEST.view.logoper.List' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.logoperlist',
    store: 'LogoperStore',
    selModel:Ext.create('Ext.selection.CheckboxModel',{mode:"SINGLE"}),
    title : '信息列表',
    initComponent: function() {
    	Ext.apply(this,{
    		columns:[
        	{header: 'ID',  dataIndex: 'tloId', align:'center',hidden:true, flex: 1},
            {header: '操作用户',  dataIndex: 'tsuName', align:'center', flex: 0.5},
            {header: '操作模块',  dataIndex: 'tsmName', align:'center', flex: 1},
            {header: '模块功能',  dataIndex: 'tsoName', align:'center', flex: 0.5},
            {header: '操作url',  dataIndex: 'tloUrl', align:'center', flex: 1.5},
            {header: '操作内容',  dataIndex: 'tloContent', align:'center', flex: 2},
            {header: '操作时间',  dataIndex: 'tloTime', align:'center', flex: 0.5,renderer:function(value){
            	var val=value.substr(0,value.lastIndexOf('.'));
            	return val;
            }},
            {header: '操作结果',  dataIndex: 'tsrStatus',align:'center',  flex: 0.35,
            	renderer:function(value){
            		if(value==1){
            			return "<span style='color:green'>成功</span>";
            		}else{
            			return "<span style='color:red'>失败</span>";
            		}
            	}
            
            }
        ],
        stripeRows: true,
	    columnLines:true,// 添加列的框样式
	    dockedItems: [{
			xtype: 'toolbar',
			dock: 'top',
			items: []
		},{
                xtype: 'pagingtoolbar',
                store: 'LogoperStore',  // same store GridPanel is using
                dock: 'bottom', // 分页 位置
                emptyMsg: '没有数据',
                pageSize:10,
                displayInfo: true,
                displayMsg: '当前显示{0}-{1}条记录 / 共{2}条记录 ',
                beforePageText: '第',
                afterPageText: '页/共{0}页'
	    }]
	   });
       this.callParent(arguments);
    }
});